<?php
/*--------------------------
	file:	smarty.class
	intro:	smarty模板引用
--------------------------*/
include_once($smartydir."./Smarty.class.php"); //包含smarty类文件

function initSmarty($dir='default'){
	global $tempdir;
	$tpl = new Smarty();
	//$dir = strtolower($dir);
	$tpl->template_dir = $tempdir."$dir/";
	$tpl->compile_dir = ROOT . "./d/cache/smarty/template_c/";
	$tpl->config_dir = ROOT . "./d/cache/smarty/config/";
	$tpl->cache_dir = ROOT . "./d/cache/smarty/cache/";
	$tpl->left_delimiter = '<{';
	$tpl->right_delimiter = '}>';
	$tpl->caching = false;
	$tpl->force_compile=false;
	$tpl->assign("site_title","midp");

	return $tpl;
}
//启用模板引擎
?>